package com.hnkywl.sts.entity.zjgl;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-6-6
 * Time: 下午1:44
 * To change this template use File | Settings | File Templates.
 */

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 说明：银行授信明细
 * 包:        com.hnkywl.sts.entity.zjgl
 * 类描述:    银行授信明细
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@Table(name = "T_BIZ_YHSXMX")
@Where(clause = "deleted!='1'")
public class Yhsxmx extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqYhsxmx", allocationSize = 1, sequenceName = "SEQ_BIZ_YHSXMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqYhsxmx")
    private Long id;

    /**
     * 银行授信
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "YHSX_ID")
    private Yhsx yhsx;
    /**
     * 银行收付类型  sk  收款  fk 付款
     */
    private String  yhsxsflx;

    /**
     * 还款日期
     */
    private Date hkrq;

    /**
     * 借款金额
     */
    private Float jkje;

    /**
     * 还款金额
     */
    private Double hkje;

    /**
     * 还息金额
     */
    private Double hxje;

    /**
     * 支付方式
     */
    @ManyToOne
    @JoinColumn(name="ZFFS_SJZDZ_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Sjzdz zffs;

    /**
     * 票据号码
     */
    private String pjhm;

    /**
     * 备注
     */
    private String bz;

    /**
     * 会计年
     */
    @Column(name = "jiuqi_acctyear")
    private Integer acctyear;
    /**
     * 生成久其凭证时提供的ID
     */
    @Column(name = "jiuqi_uuid")
    private String uuid;
    /**
     * 久其返回的凭证ID
     */
    @Column(name = "jiuqi_voucher_id")
    private String voucherId;
    /**
     * 久其返回的凭证号
     */
    @Column(name = "jiuqi_voucher_num")
    private Integer voucherNum;
    /**
     * “久其插入标示”代码   1=未导入,2=导入开始,3=导入成功
     */
    @Column(name = "jiuqi_insert_flag")
    private Integer insertFlag = 1;
    /**
     * "久其删除标示”代码   1=未删除,2=删除开始,3=删除成功
     */
    @Column(name = "jiuqi_delete_flag")
    private Integer deleteFlag = 1;

    /**
     * 操作状态
     */
    @Transient
    private String czzt;

    //初始化字段  凡是从老系统导入的为初始化字段  置为 1  其他为非初始化
    private String csh ;

    /**
     * 导入日期
     */
    private Date drrq;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Yhsx getYhsx() {
        return yhsx;
    }

    public void setYhsx(Yhsx yhsx) {
        this.yhsx = yhsx;
    }

    public Date getHkrq() {
        return hkrq;
    }

    public void setHkrq(Date hkrq) {
        this.hkrq = hkrq;
    }

    public BigDecimal getHkje() {
        BigDecimal bigDecimal = new BigDecimal(hkje==null?0:hkje);
        return bigDecimal;
    }

    public void setHkje(Double hkje) {
        this.hkje = hkje;
    }

    public Double getHxje() {
        return hxje;
    }

    public void setHxje(Double hxje) {
        this.hxje = hxje;
    }

    public Sjzdz getZffs() {
        return zffs;
    }

    public void setZffs(Sjzdz zffs) {
        this.zffs = zffs;
    }

    public String getPjhm() {
        return pjhm;
    }

    public void setPjhm(String pjhm) {
        this.pjhm = pjhm;
    }

    public Float getJkje() {
        return jkje;
    }

    public void setJkje(Float jkje) {
        this.jkje = jkje;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Integer getAcctyear() {
        return acctyear;
    }

    public void setAcctyear(Integer acctyear) {
        this.acctyear = acctyear;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getVoucherId() {
        return voucherId;
    }

    public void setVoucherId(String voucherId) {
        this.voucherId = voucherId;
    }

    public Integer getVoucherNum() {
        return voucherNum;
    }

    public void setVoucherNum(Integer voucherNum) {
        this.voucherNum = voucherNum;
    }

    public Integer getInsertFlag() {
        return insertFlag;
    }

    public void setInsertFlag(Integer insertFlag) {
        this.insertFlag = insertFlag;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getYhsxsflx() {
        return yhsxsflx;
    }

    public void setYhsxsflx(String yhsxsflx) {
        this.yhsxsflx = yhsxsflx;
    }

    public String getCzzt() {
        return czzt;
    }

    public void setCzzt(String czzt) {
        this.czzt = czzt;
    }

    public String getCsh() {
        return csh;
    }

    public void setCsh(String csh) {
        this.csh = csh;
    }

    public Date getDrrq() {
        return drrq;
    }

    public void setDrrq(Date drrq) {
        this.drrq = drrq;
    }
}
